import { WeaTools } from 'ecCom';

//资产树
export const getTreeDatas = params => {
	return WeaTools.callApi('/api/cpt/capitalsearch/treeNode', 'GET', params);
}

// 右键
export const getRightMenu = params => {
	return WeaTools.callApi('/api/cpt/capitalsearch/rightMenu', 'GET', params);
}

// 高级搜索
export const getCondition = params => {
	return WeaTools.callApi('/api/cpt/capitalsearch/condition', 'GET', params);
}

//获取资产列表
export const getCptList = params => {
	return WeaTools.callApi('/api/cpt/capitalsearch/list', 'GET', params);
}

//资产管理(领用、调拨)等
export const doCptManager = params => {
	return WeaTools.callApi('/api/cpt/manager/docptmanager', 'POST', params);
}

//送修 --表单信息
export const doMend = params =>{
	return WeaTools.callApi('/api/cpt/cptmend/view','GET',params)
}

//送修 --确认送修
export const doMendSure = params =>{
	return WeaTools.callApi('/api/cpt/cptmend/docptmend','GET',params)
}

//共享设置  保存
export const addCptShare = params =>{
	return WeaTools.callApi('/api/cpt/capital/addcptshare','POST',params)
}

//日志  高级搜素
export const getlogCondition = params =>{
	return WeaTools.callApi('/api/cpt/cptmend/condition','GET',params)
}
//列表
export const getlogList = params =>{
	return WeaTools.callApi('/api/cpt/cptmend/loglist','GET',params)
}

//资产信息
export const getCptInfo = params =>{
	return WeaTools.callApi('/api/cpt/capital/view','GET',params)
}

//资产右键
export const getCardRightMenu = params =>{
	return WeaTools.callApi('/api/cpt/capital/rightMenu','GET',params)
}

//资产 编辑 保存
export const saveCptEdit = params =>{
	return WeaTools.callApi('/api/cpt/capital/doedit','POST',params)
}

//变更记录 
export const getCptModifyList = params =>{  
	return WeaTools.callApi('/api/cpt/capital/cptmodifysearch','GET',params)
}
//变更记录--流转日志  高级搜索 
export const getCptCardCondition = params =>{  //capitalid=547&adtype=modify   ||capitalid=547&adtype=flow
	return WeaTools.callApi('/api/cpt/capital/condition','GET',params)
}

//流转日志 
export const getCptFlowList = params =>{  
	return WeaTools.callApi('/api/cpt/capital/cptflowsearch','GET',params)
}

export const getCptFlowDetail = params =>{  
	return WeaTools.callApi('/api/cpt/capital/cptflowdetail','GET',params)
}

export const checkRight = params => {
	return  WeaTools.callApi('/api/cpt/maint/checkRight', 'GET', params);
}

//获取资产模块应用分权是否开启和 禁用所有人是否开启并配置应用列表
export const getDetachable = params => {
	return  WeaTools.callApi('/api/cpt/maint/getDetachable', 'GET', params);
}